
 package com.ami.kvm.jviewer.gui;
 
 import com.ami.kvm.jviewer.Debug;
 import com.ami.kvm.jviewer.JViewer;
 import com.ami.kvm.jviewer.videorecord.URLHandler;
 import com.ami.kvm.jviewer.videorecord.URLProcessor;
 import javax.swing.ImageIcon;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 public class OEMResourceURLProcessor
   extends URLHandler
 {
   private final String oemPath = "/res/oem";
   private final String restOemPath = "/api/logs/help-data";
   private final String copyrightFileName = "copyright_";
   private final String copyrightFileExtn = ".txt";
   private final String logoFileName = "jviewerlogo.jpg";
   
 
   private String serverIp;
   
   private String protocol;
   
 
   public OEMResourceURLProcessor(String paramString1, String paramString2)
   {
     this.sesCookie = paramString1;
     this.serverIp = paramString2;
     if (JViewer.isWebSecure()) {
       this.protocol = "https://";
     } else
       this.protocol = "http://";
   }
   
   public String getOemCopyright() {
     String str1 = null;
     String str2 = null;
     
     if (JViewer.isRestService()) {
       getClass();getClass();str2 = this.protocol + this.serverIp + ("/res/oem".startsWith("/") ? "" : "/") + "/api/logs/help-data" + "?file=" + "copyright_" + JViewer.getLanguage() + ".txt";
     }
     else {
       getClass();getClass();getClass();str2 = this.protocol + this.serverIp + ("/res/oem".startsWith("/") ? "" : "/") + "/res/oem" + ("/res/oem".endsWith("/") ? "" : "/") + "copyright_" + JViewer.getLanguage() + ".txt";
     }
     
 
     byte[] arrayOfByte = getOemResourceBytes(str2);
     if (arrayOfByte != null) {
       str1 = new String(arrayOfByte);
       Debug.out.println(str2 + " is available url");
     }
     return str1;
   }
   
   public ImageIcon getOemLogo() {
     ImageIcon localImageIcon = null;
     String str = null;
     
     if (JViewer.isRestService()) {
       getClass();getClass();str = this.protocol + this.serverIp + ("/res/oem".startsWith("/") ? "" : "/") + "/api/logs/help-data" + "?file=" + "jviewerlogo.jpg";
     }
     else {
       getClass();getClass();getClass();str = this.protocol + this.serverIp + ("/res/oem".startsWith("/") ? "" : "/") + "/res/oem" + ("/res/oem".endsWith("/") ? "" : "/") + "jviewerlogo.jpg";
     }
     
     byte[] arrayOfByte = getOemResourceBytes(str);
     if (arrayOfByte != null) {
       localImageIcon = new ImageIcon(arrayOfByte);
       Debug.out.println(str + " is available url");
     }
     return localImageIcon;
   }
   
   public byte[] getOemResourceBytes(String paramString)
   {
     byte[] arrayOfByte = null;
     URLProcessor localURLProcessor = null;
     String str = JViewerApp.getInstance().getM_webSession_token();
     
 
     if ((JViewer.isRestService() == true) && (str == null))
     {
       JViewerApp.getInstance().getConnectionDialog().restGetCSRFToken();
       str = JViewerApp.getInstance().getM_webSession_token();
     }
     localURLProcessor = new URLProcessor(str, JViewer.getWebSecure());
     
     int i = localURLProcessor.processRequest(paramString);
     
     if (i == 0)
     {
 
       arrayOfByte = localURLProcessor.getData();
     }
     return arrayOfByte;
   }
 }


/* Location:              D:\Users\tianlin\Downloads\JViewer.jar!\com\ami\kvm\jviewer\gui\OEMResourceURLProcessor.class
 * Java compiler version: 5 (49.0)
 * JD-Core Version:       0.7.1
 */